<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
    <style>

    </style>
</head>

<body>
    <div id="app">
        <child>
            <a href="">链接aaa</a>
        </child>
    </div>
</body>

<template id="tmpl">
    <div>
        <!-- 
            slot就是插槽，用来接收这个组件被调用时候的内部标签
            这个slot没有name属性，所以叫匿名插槽
        -->
        <slot></slot>
        <h1>child标题</h1>
    </div>
</template>

<script>
    let child = {
        template: '#tmpl'
    }
    var vm = new Vue({
        el: '#app',
        data: {},
        components: {
            child
        }
    })
</script>

</html>